﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Training9
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }
        public static bool login;

        private void frmMain_Load(object sender, EventArgs e)
        {
            frmLogin obj = new frmLogin();
            obj.ShowDialog();

            if (!login) 
            {
                Application.Exit();
            }

        }

        private void ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmCourseTypeAdd obj = new frmCourseTypeAdd();
            obj.MdiParent= this;
            obj.Show();
        }

        private void ToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            frmCourseAdd obj = new frmCourseAdd();
            obj.MdiParent= this;
            obj.Show();
        }

        private void ToolStripMenuItem3_Click(object sender, EventArgs e)
        {
            frmTeacherAdd obj = new frmTeacherAdd();
            obj.MdiParent= this;
            obj.Show();
        }

        private void ToolStripMenuItem7_Click(object sender, EventArgs e)
        {
            frmCourseSel obj = new frmCourseSel();
            obj.MdiParent= this;
            obj.Show();
        }

        private void ToolStripMenuItem8_Click(object sender, EventArgs e)
        {
            frmCourseUP obj = new frmCourseUP();
            obj.MdiParent= this;
            obj.Show();
        }

        private void ToolStripMenuItem9_Click(object sender, EventArgs e)
        {
            frmCourseUP obj = new frmCourseUP();
            obj.MdiParent = this;
            obj.Show();
        }

        private void ToolStripMenuItem10_Click(object sender, EventArgs e)
        {
            frmTeacherAdd obj = new frmTeacherAdd();
            obj.MdiParent = this;
            obj.Show();
        }

        private void ToolStripMenuItem11_Click(object sender, EventArgs e)
        {
            frmTeacherAdd obj = new frmTeacherAdd();
            obj.MdiParent = this;
            obj.Show();
        }

        private void ToolStripMenuItem12_Click(object sender, EventArgs e)
        {
            frmTeacherAdd obj = new frmTeacherAdd();
            obj.MdiParent = this;
            obj.Show();
        }

        private void ToolStripMenuItem4_Click(object sender, EventArgs e)
        {
            frmStudentSel obj = new frmStudentSel();
            obj.MdiParent = this;
            obj.Show();
        }

        private void ToolStripMenuItem5_Click(object sender, EventArgs e)
        {
            frmStudentSel obj = new frmStudentSel();
            obj.MdiParent = this;
            obj.Show();
        }

        private void ToolStripMenuItem6_Click(object sender, EventArgs e)
        {
            frmStudentSel obj = new frmStudentSel();
            obj.MdiParent = this;
            obj.Show();
        }
    }
}
